//
//  BaseTableView.swift
//  OnceNectar
//
//  Created by 法正磊 on 2018/1/30.
//  Copyright © 2018年 com.inwhoop. All rights reserved.
//

import UIKit
import MJRefresh
class BaseTableView: UITableView {
   
    override func awakeFromNib() {
        DispatchQueue.global().asyncAfter(deadline: DispatchTime.now() + TimeInterval(anTIME)) {
            DispatchQueue.main.async {
                self.mj_footer.isHidden = true
            }
        }
    }
    
    func refreshHeader(completionHandler: @escaping () -> Void) {
        self.mj_header = MJRefreshNormalHeader(refreshingBlock: {
            completionHandler()
           
        })
    }
    
    func refreshFooter(completionHandler: @escaping () -> Void) {
        self.mj_footer = MJRefreshAutoNormalFooter(refreshingBlock: {
            completionHandler()
            
        })
    }

}
